<?php
	include('game.php');
	include('player.php');
	include('graph.php');
	session_start();
	mysql_connect("localhost", "pigeon", "bois");
	mysql_select_db("pigeon");
	if ($_SESSION['active'] == 1)
	{;
		$game = &$_SESSION['game'];
	}
	else
	{
		$game = new game();	
		$_SESSION['game'] = $game;
		$_SESSION['active'] = 1;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<title> this is the pigeon test page </title>
	<link rel="stylesheet" type="text/css" href="pige.css" />
	<script type="text/javascript" src="function.js" ></script>
</head>
<body>
	<h1>this is the pigeon developpement page</h1>
	<?
	$game->draw();
	?>
<form name=restart METHOD='POST' action='index_new.php'>
	<input type=hidden name=game value=new />
	<input type=submit value='Nouvelle partie'/>
	</form>
	<br/>
	<form METHOD='POST' action='index_new.php'>
	<input type=hidden name=game value=next />
	<input type=submit value='Tour suivant'/>
	</form>
<?	
	mysql_close();
?>
</body>
</html>

